home *** CD-ROM | disk | FTP | other *** search
- The cd_copy Program
-
-
- The cd_copy program, copies files/directories stored on a
- CD-ROM created by Makedisc, the CD-ROM formatting software from
- Young Minds, Inc., to a specified target directory on hard disk.
- What makes this program more useful than a standard copy utility
- is that it will recover the original UNIX file/directory names off
- the CD-ROM disc and, in essence, restore the original UNIX file
- system. The program uses a 'cdrom_directory' to search for a
- translation file (for example, 'YMTRANS.TBL'). If found the program
- uses the file to convert the ISO 9660 names back to the original
- UNIX names and copies the specified files and directories to a
- specified destination.
-
- Usage for cd_copy is as follows:
-
- cd_copy [-rR] cdrom_directory
-
- The -r option will recursively descend the subdirectory
- rooted at cdrom_directory copying the directory tree at each level.
-
- The -R option is for use with a Rock Ridge driver and will
- copy an image with Rock Ridge extensions.
-
- NOTE: For those with Rock Ridge drivers, we recommed using this
- utility instead of cp because cp may have difficulty with some of
- the file types as well as being somewhat slower.
-
- The following example demonstrates how to recreate the
- directory tree for 'gnuplot' in the directory ~my_account/gnuplot
- (where the CD-ROM image has been mounted as /cd-rom_disc):
-
- cd ~my_account
-
- Move to the ~my_account directory.
-
-
- In order to support as many end users of CD-ROM as
- possible, (some of which are probably unanticipated) the
- cd_copy utility is provided in source form. So, if binaries
- are not present on your platform, you can create them by
- compiling the source code with a standard ANSI C compiler
- (available on most UNIX platforms).
-
- First, copy the source to your current directory:
-
- cp /cd-rom/ym_utils/"cd_copy.c;1" cd_copy.c
-
- The quotes around the cd_copy.c;1 are necessary to prevent
- the shell from interferring with the operation. Next, enter:
-
- cc -o cd_copy cd_copy.c
-
- This will create an executable called cd_copy. On some
- platforms it may be necessary to link in a BSD compatibility
- library. Check with your system administrator or operating
- system documentation to see if this is the case for your machine.
- If so, to get cd_copy to compile you should enter the following
- command:
-
- cc -o cd_copy cd_copy.c /usr/lib/libBSD.a
-
- When your UNIX prompt reappears, enter the following commands:
-
- mkdir gnuplot
-
- Create the gnuplot directory to use in recreating the
- directory tree.
-
- cd gnuplot
-
- Move to the gnuplot directory.
-
- ../cd_copy -r /cd-rom_disc/x11r2/gnuplot
-
- or, if you want to direct output to the gnuplot directory from
- elsewhere, try:
-
- cd_copy -r /cd-rom_disc/x11r5/gnuplot <PATH>/gnuplot
-
- where <PATH> is the path to the gnuplot directory.
-
-
- It will take a little while, but once it's finished,
- listing the contents of your gnuplot directory will now show the
- files in the gnuplot directory on the CD-ROM, except that the
- original UNIX filenames will appear instead of the actual,
- translated filenames on the CD-ROM. If you want to see how they
- are different, you save the listings of both your gnuplot
- directory and the one on the CD-ROM to files and apply the
- 'diff' utility.
-
- NOTE: While all filenames on CD-ROM discs from Young Minds, Inc.
- are stored using uppercase letters, some CD-ROM file system
- drivers will automatically convert the filename characters to
- lowercase.
-
- Once you have successfully created the executable, you
- may wish to store it in some commonly accessible location like
- '/usr/local/bin'.
- Also, while the current version of Makedisc generates
- translation table entries for block device nodes, character device
- nodes, pipes and sockets (denoted as B, C, P, and S), the current
- version of cd_copy ignores these entries since there is as yet no
- well-defined, machine-independant mapping for these entries.
-